package chan.project.smartlawservice.userService;


import chan.project.smartlawmodel.entity.UserInfo;
import chan.project.smartlawmodel.entity.UserRole;
import chan.project.smartlawmodel.vo.UserInfoVO;
import chan.project.smartlawservice.config.FeignInterceptor;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;


/**
 * user内部调用接口
 */
@FeignClient(value = "everyMan",
        configuration = FeignInterceptor.class,
        path = "api/user")
public interface UserFeignClient {

    //这里的request不能传入到feign的实现类中，会报错
    @GetMapping("/inner/getLoginUser")
    UserInfoVO getLoginUser();

    @GetMapping("/inner/getById")
    UserInfo getById(@RequestParam("userId") Long userId);

    @GetMapping("/inner/getIds")
    List<UserInfo> listByIds(@RequestParam("idList") Collection<Long> idList);
}
